/*
 * 百度在线网络技术（北京）有限公司拥有本软件版权2021并保留所有权利。
 * Copyright 2021, Baidu.com,Inc 2:Baidu Online Network Technology (Beijing) Co.,Ltd,
 * All rights reserved.
 */

package com.azdebugit.spring.beantest.cnblog.spring.valu01; /**
 * @author n00444323
 * @date 2019/1/15 15:58
 */
 
import com.sun.org.apache.bcel.internal.generic.JSR;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
 
import java.lang.annotation.Inherited;
 
import javax.annotation.Resource;
import javax.inject.Inject;
 
import jdk.nashorn.internal.objects.annotations.Getter;
import jdk.nashorn.internal.objects.annotations.Setter;
 
/**
 * @param
 * @return
 * @throws
 */
@Service
public class UserService
{
 
    @Autowired
    @Qualifier(value = "createUserDao")  //使用Qualifier指定bean对象
    private  UserDao userDao;
 
 
    @Resource  //JSR 250 提供的注入能力
    @Qualifier(value = "createUserDao2")
    private  UserDao userDao1;
 
 
    @Inject
    @Qualifier(value = "createUserDao3")
    private  UserDao userDao2;
 
    private  void show(){
        System.out.println("UserService...userDao");
    }
 
    @Override
    public String toString()
    {
        return "UserService{" +
                "userDao=" + userDao +
                ", userDao1=" + userDao1 +
                ", userDao2=" + userDao2 +
                '}';
    }
}